package day13homework;

import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;

public class MainWiondow {
	public static void main(String[] args) {
		JFrame frame = new JFrame("欢迎使用");
		JPanel panel = new JPanel();
		frame.add(panel);
		JButton stuButton = new JButton("学生管理");
		stuButton.setPreferredSize(new Dimension(100, 40));
		stuButton.addActionListener(new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
//				StudentWin studentWin = new StudentWin();
//				studentWin.init();				
			}
		});
		JButton teaButton = new JButton("教师管理");
		teaButton.setPreferredSize(new Dimension(100, 40));
		teaButton.addActionListener(new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
//				TeacherWin teacherWin = new TeacherWin();
//				teacherWin.init();
				}
		});
		panel.add(stuButton);
		panel.add(teaButton);
		frame.setSize(500, 200);
		frame.setLocation(450, 450);
		frame.setVisible(true);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}
}
